package com.etoak.controller;

import com.etoak.entity.User;
import com.etoak.service.USerService;
import com.etoakk.common.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    USerService userService;

    @PostMapping("/registry")
    public ResultVO<Object> registry(@RequestBody User user){
        userService.registry(user);
        return ResultVO.success();
    }
}

